package com.vcg.vdam.aop;

/**
 * FileName: AssetTypeEnum
 * Author:   yangxing
 * Date:     2019/9/25 16:12
 * Description: 文件类型
 */
public enum AssetTypeEnum {

    IMAGE("图片", (byte) 1),
    AUDIO("音频", (byte)2),
    VIDEO("视频", (byte)3),
    FILE("文件", (byte)4),
    RESGROUP("资源组", (byte)5),
    RICHTEXT("富文本", (byte)6),
    EDUFILE("院校附件", (byte)7),
    IMAGETEXT("图文", (byte)8),
    TMP("临时", (byte)10),
    OTHERS("其他", (byte)9);
    private String name;
    private byte statu;

    AssetTypeEnum(String name, byte statu) {
        this.name = name;
        this.statu = statu;
    }

    // 普通方法
    public static String getName(byte statu) {
        for (AssetTypeEnum assetTypeEnum : AssetTypeEnum.values()) {
            if (assetTypeEnum.getStatu() == statu) {
                return assetTypeEnum.name;
            }
        }
        return null;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getStatu() {
        return statu;
    }

    public void setStatu(byte statu) {
        this.statu = statu;
    }
}
